#!/bin/sh
# entrypoint.sh

# 设置时区
ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone

# 执行备份日志的命令
trap 'echo "Received termination signal, backing up logs..."; /usr/charging/backup_logs.sh; exit 0' TERM INT

# 启动应用程序
exec java $JAVA_OPTS -jar /usr/charging/charging-admin.jar